#pragma once

#include "AST.hpp"
#include <llvm/ADT/SmallVector.h>
#include "debug_utils.hpp"
#include <global.hpp>
struct ASTNode {
    OpType op;
    llvm::Type *type = nullptr;

    llvm::SmallVector<Expr *> initArgs;
    llvm::SmallVector<llvm::Type *> funParaTypes;
    llvm::SmallVector<std::string> funParaNames;
    llvm::SmallVector<bool> funParaIsRefs;
    llvm::SmallVector<uint64_t, 2> arraySizes;

    bool isFunParaRef = false;
    int iValue = 0;
    double dValue = 0.0;
    char c = '\0';
    std::string content;
    Expr *node = nullptr;
    ASTNode() { }

    ASTNode& operator=(const ASTNode&) = default;
    ASTNode& operator=(ASTNode&& o);
};

typedef struct ASTNode YYType;

#define YYSTYPE YYType